/*
 * @Descripttion:
 * @version:
 * @Author: ZmSama
 * @Date: 2022-01-10 22:21:29
 */
import "./App.css";
import axios from "axios";
import GanttTable from "./components/gantt-table";
import { useEffect, useState } from "react";

function App() {
  const [dataSource, setDataSource] = useState<any>([]);

  useEffect(() => {
    axios
      .get("/postdata1")
      .then((res) => {
        setDataSource(res.data.list);
      })
      .catch((err) => {
        console.log(err);
      });
  }, []);
  return (
    <div className="App">
      <div className="demo">
        <GanttTable
          height={616}
          itemHeight={41}
          dataSource={dataSource}
          time="2022-1"
        />
      </div>
    </div>
  );
}

export default App;
